home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #15 / Monster Media Number 15 (Monster Media)(July 1996).ISO / prog_c / sm099c.zip / EXAMPLE / DESTROY.C < prev    next >
C/C++ Source or Header  |  1996-03-03  |  641b  |  31 lines

  1. #include "example.h"
  2.  
  3. void RestoreScreen ( void )
  4. /* Restore screen (color, mode, etc.) back to what it was when the program
  5.    was started. */
  6. {
  7.    #ifdef GUI
  8.    #ifdef OS2
  9.    WinStopTimer (hAB, hWndClient, TID_MOVE);
  10.    WinReleasePS (hPS);
  11.    WinDestroyWindow (hWndFrame);
  12.    WinDestroyMsgQueue (hMQ);
  13.    WinTerminate (hAB);
  14.    #else
  15.    closegraph (); /* Return the system to text mode */
  16.    #endif
  17.    #else
  18.    ClrScr ();
  19.    normvideo ();
  20.    gotoxy (0, iScreenH - 1);
  21.    _setcursortype (_NORMALCURSOR);
  22.    #endif
  23. }
  24.  
  25. void Terminate ( void )
  26. /* Get ready to exit this silly program */
  27. {
  28.    RestoreScreen ();
  29. }
  30.  
  31.